private ["_isAdmin"];

_unit = player;
if (!(isNil "_this") && {typename _this == typename objNull}) then {
	_unit = _this;
};
_isAdmin = !isMultiplayer;

if (!_isAdmin) then {
	_isAdmin = ((serverCommandAvailable "#shutdown") || (isServer AND !isDedicated));
};
if (!_isAdmin && mprightsDisable < 1 && !(isNil "mp_rights_fnc_mustHaveRoles")) then {
	_isAdmin = [(getPlayerUID _unit),"admin"] call mp_rights_fnc_mustHaveRoles;
};
// Temporary fix when BIS broke serverCommandAvailable
// if (!_isAdmin && !(isNil "isAdmin")) then {
	// _isAdmin = isAdmin;
// };
_isAdmin;